#include <stdio.h>
#include <unistd.h>
#include <signal.h>

void fun(int sig)
{
	printf("hello world\n");
}

int main()
{

	signal(SIGALRM,fun);
	printf("%d\n",getpid());

	alarm(5);

	while(1)
	{
		printf("nihao\n");
		sleep(1);
	}

	return 0;
}
